package com.yidu.BusinessData.entity;


import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 行情数据 实体类
 * @author 任俊杰
 * @version 1.0
 * @date 2022/12/5
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MarketData {
    private String marketId; //行情数据id 主键 备注：添加id时最好写成工具类，自动生成id，M20220622001
    private String securityId;// 证券id 外键
    private String TIME; // 录入时间
    private double openingPrice;// 开盘价格
    private double closingPrice; // 收盘价格 (闭市价格)
    private String fundId; // 基金id 外键 备注：基金代码都是6位数的 如：614587
    private String Remark; //备注

    //加字段 证券名称
    private String securityName;


    public MarketData(String marketId, String securityId, String TIME, double openingPrice, double closingPrice, String remark) {
        this.marketId = marketId;
        this.securityId = securityId;
        this.TIME = TIME;
        this.openingPrice = openingPrice;
        this.closingPrice = closingPrice;
        Remark = remark;
    }


    public MarketData(String marketId, String securityId, String TIME, double openingPrice, double closingPrice, String fundId, String remark) {
        this.marketId = marketId;
        this.securityId = securityId;
        this.TIME = TIME;
        this.openingPrice = openingPrice;
        this.closingPrice = closingPrice;
        this.fundId = fundId;
        Remark = remark;
    }


    public MarketData(String securityId, String TIME, double openingPrice, double closingPrice,  String remark,String marketId) {
        this.securityId = securityId;
        this.TIME = TIME;
        this.openingPrice = openingPrice;
        this.closingPrice = closingPrice;
        this.Remark = remark;
        this.marketId=marketId;
    }
}

